/**
*	@file Affects.h
*
*	@brief this header file is to define Affect range table
*
*	@author li yuchen
*
*	@date 1/28/2011
*/
#ifndef AFFECTSBIP_H
#define AFFECTSBIP_H
#include "StmtTable.h"
#include "Modifies.h"
#include "Uses.h"
#include "Next.h"
#include "NextBip.h"
#include "BlkNode.h"
#include "BlkTable.h"
#include <set>
#include <vector>



class AffectsBip{
public:
	static void			RebuildAffectsBip();

	static bool			IsAffectsBip(StmtNum assign_num_left, StmtNum assign_num_right);
	static bool			IsAffectsBipAdv(StmtNum assign_num_left, StmtNum assign_num_right);

	static string		ToString();

	
private:
	static AssignSet&	GetAffectsBipRight(AssignNum assign_num_left);
	static AssignSet&	GetAffectsBipLeft(AssignNum assign_num_right);



	static AssignSet&	GetAffectsBipRightAdv(AssignNum assign_num_left);
	static vector<AssignSet>	affectsbip_table_;
	static vector<AssignSet>	affectsbip_table_t_;
	static AssignSet			affectsbip_has_a0_;
	static AssignSet			affectsbip_has_0a_;
	static AssignSet			affectsbip_has_0a_cache_;
	static AssignSet			affectsbip_has_a0_cache_;
	static bool					affectsbip_has_00_;
	static bool					affectsbip_has_00_cache_;


	static vector<AssignSet>	affectsbip_star_table_;
	static AssignSet	affectsbip_star_table_cache_;
};
#endif
